package com.jiuqi.bi.irp.core.manager;

import java.sql.Connection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;

import com.jiuqi.bi.adaptor.connection.ConnectionManager;
import com.jiuqi.bi.irp.core.dao.DomainLabelDao;
import com.jiuqi.bi.irp.core.item.DomainLabel;


	/**
	 * 将所有含有字母的标签编码全部转为大写
	 * @param conn
	 * @throws Exception
	 */
	public void capitalizeLCodeField(Connection conn) throws Exception {
		Set<String> letterTagCodeSet = DomainLabelDao.queryAllLetterTagCodes(conn);
		Map<String, String> letterTagCodeMap = letterTagCodeSet.stream().collect(Collectors.toMap(Function.identity(), String::toUpperCase));
		DomainLabelDao.modifyAllLetterTagCodes(conn, letterTagCodeMap);
	}
}